#pragma once

#include "Debug.hpp"

#include <boost/noncopyable.hpp>

namespace cge {
	class SceneNode;
	class Entity;

	class Entity: boost::noncopyable {
	public:
		virtual ~Entity();

		virtual void onRendered()    {}
		virtual void onTransformed() {}
		virtual void onDestroyed()   {}
		virtual void onAttached()    {}
		virtual void onDetached()    {}

		SceneNode& getNode() { CGE_ASSERT( node_ ); return *node_; }
		bool       isAttached() const { return node_ != 0; }

	protected:
		Entity(): node_(0) {}

	private:
		friend class SceneNode;
		SceneNode *node_;
	};
}